<extend name="./Application/Home/View/default/_Layout/main.html"/>

<block name="breadcrumb">
    <div class="container">
        <ul class="breadcrumb">
            <li><i class="icon-location-arrow"></i></li>
            <li><a href="__ROOT__/">首页</a></li>
            <li><a href="{:U('')}">{$meta_title}</a></li>
        </ul>
    </div>
</block>

<block name="main">
    <div class="container">
        <div class="row">
            <volist name="app_list" id="app">
                <div class="col-sm-4 col-md-3" col-lg-3>
                    <div class="thumbnail">
                        <a href="{:U('detail', array('title' => $app['title']))}"><img class="lazy" src="{$app.cover|get_cover}" alt="{$app.title}" style="width:100%;height:120px;"></a>
                        <div class="caption">
                            <h3>{$app.title}</h3>
                            <p style="height:60px;">{$app.abstract|get_str=0,50}</p>
                            <p>
                                <a href="{:U('read', array('title' => $app['title']))}" class="btn btn-warning" role="button"><i class="fa fa-download"></i> 在线阅读</a>
                                <a href="{:U('read', array('title' => $app['title']))}" class="btn btn-info border-radius-none" role="button"><i class="fa fa-info-circle"></i> 下载</a>
                            </p>
                            <p class="small">
                                <a href="#" class="text-muted" role="button">作者：{$app.user.username}</a>
                                <a href="#" class="pull-right text-muted" role="button">下载次数：{$app.download}</a>
                            </p>
                        </div>
                    </div>
                </div>
            </volist>
            <notempty name="page">
                <ul class="pagination">{$page}</ul>
            </notempty>
            <empty name="app_list">
                <div class="text-center clearfix">暂时没有数据～</div>
            </empty>
        </div>
    </div>
</block>

<block name="script">
    <script type="text/javascript">
        $(function(){
            var current_type = '<php>echo $_GET["type"]?:"module"</php>';
            $('.app_type .'+current_type).addClass('active');
        });
    </script>
</block>
